package com.atguigu.gmall.util;

import java.util.ResourceBundle;

/**
 * 根据properties中的key获取value
 * 解耦配置文件的修改操作
 *
 * @author : ranzlupup
 * @since : 2023/6/1 11:57
 */
public class MyPropertiesUtils {
    public static String getPropsValue(String propsKey) {
        ResourceBundle resourceBundle = ResourceBundle.getBundle("config");
        return resourceBundle.getString(propsKey);
    }

    public static void main(String[] args) {
        System.out.println(MyPropertiesUtils.getPropsValue("kafka.bootstrap-servers"));
    }
}
